<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>子贤医管培训系统</title>
<link href="<?=STATICURL?>css/list.css" rel="stylesheet">
<link href="<?=STATICURL?>css/skitter.css" rel="stylesheet">
<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	font-weight: bold;
}
.STYLE2 {
	font-size: 14px;
	font-weight: bold;
	color: #40a3e2;
}
-->
</style>
</head>

  
<body>
<!-------------------ppt开始-------------------->
<div id="banner"><img src="<?=STATICURL?>index_img/banner.jpg" /></div>
<!-------------------ppt结束-------------------->
<!-------------------新闻开始-------------------->
<div id="news">
	<div class="news-img">
		<div class="news-img-head">
			<div class="news-img-head-left"><img src="<?=STATICURL?>index_img/news-left.jpg" /></div>
				<div class="news-img-head-middle">
					<h1>新闻图片</h1>
		  </div>
			<div class="news-img-head-right"><img src="<?=STATICURL?>index_img/news-right.jpg" /></div>
		</div>
			<div class="news-img-in">
        <div class="box_skitter box_skitter_large">
          <ul>
              <?php if($videoList):?>
                  <?php foreach ($videoList as $key => $value):?>
                 <li><a <?php if($_SESSION['userInfo']):?>href="/video/detail?id=<?=$value['id']?>"<?php else:?>href="javascript:alert('请登录');"<?php endif;?>  ><img src="/uploads/<?=$value['cover']?>" height="246px" width="327px;" class="cubeRandom" /></a><div class="label_text"><p>cubeRandom</p></div></li>
                <?php endforeach;?>
                <?php else:?>
                <li class="gray">暂时没有数据………</span>
              <?php endif;?>
          </ul>
        </div>
			</div>
	</div>
 	
    <div class="news-edu">
   	  	<div class="news-edu-head">
			<div class="news-edu-head-left"><img src="<?=STATICURL?>index_img/news-left.jpg" /></div>
				<div class="news-edu-head-middle">
					<h1>公共新闻</h1>
					<h2><a href="#">>>更多</a></h2>
		  </div>
			<div class="news-edu-head-right"><img src="<?=STATICURL?>index_img/news-right.jpg" /></div>
     	</div>
		
        <div class="news-edu-in">
			<ul>
				<li><em>2016-12-21</em><a href="#">年终特稿：2016年我国教育化教育书写温...</a></li>
				<li><em>2016-12-21</em><a href="#">教育不能迷失在教育信息化浪潮中...</a></li>
				<li><em>2016-12-21</em><a href="#">山东威海荣成七教育信息以上中小学装上.</a>..</li>
				<li><em>2016-12-21</em><a href="#">贵州600余万中教育信息学生率先获得全...</a></li>
				<li><em>2016-12-21</em><a href="#">浙江杭州江干区教育信教育信息化区域推...</a></li>
				<li><em>2016-12-21</em><a href="#">浙江2014年底教育信息将建成1000个微..</a>.</li>
				<li><em>2016-12-21</em><a href="#">福建明年将教育信息现优质教育资源共...</a></li>
				<li><em>2016-12-21</em><a href="#">深化教育领教育信息综合改革述评：扬...</a></li>
				<li><em>2016-12-21</em><a href="#">北京一学校教育信启动雾霾天远程教学...</a></li>
		  </ul>  
      </div>
    </div>
<div class="news-login">
    
	  <div class="news-login-head">
		  <div class="news-login-head-left"><img src="<?=STATICURL?>index_img/denglu-left.png" /></div>
      	<div class="news-login-head-middle">
   		  <h1>用户登录</h1>
      	</div>
      <div class="news-login-head-right"><img src="<?=STATICURL?>index_img/denglu-right.png" /></div>
  	</div> 
    <?php if(!isset($_SESSION['userInfo']) && empty($_SESSION['userInfo'])):?>
    <div class="news-login-in">
			<div class="news-login-in-1">
				<div class="news-login-in-1-1">用户名：</div>
				<div class="news-login-in-1-2">
					<label>
					<input name="username" type="text" id="username" />
					</label>
				</div>
			</div>
      <div class="news-login-in-2">
        <div class="news-login-in-1-1">密&nbsp;&nbsp;码：</div>
          <div class="news-login-in-1-2">
              <label>
                <input name="password" type="password" id="password" />
              </label>
          </div>
      </div>
    	<div class="news-login-in-4">
          <div class="login_botton"><a href="javascript:;" onclick="J_login()">登录</a></div>
        	<div class="login_botton" style="background-color: #999;"><a href="javascript:;" onclick="J_reset()">重置</a></div>
      </div>
    </div>
    <?php else:?>
      <div class="news-login-in">
      <div class="news-login-in-1">
        <div class="news-login-in-1-1">用户名：</div>
        <div class="news-login-in-1-1">
            <?=$_SESSION['userInfo']['username']?>
        </div>
      </div>
      <div class="news-login-in-1">
          <div class="login_botton" style="padding: 0 10px;margin-left: 0px;"><a href="/user/account" >进入系统</a></div>
          <div class="login_botton" style="background-color: #999;"><a href="/login/logout" >退出</a></div>
      </div>
     
    </div>
    <?php endif;?>
</div>
</div>
<!-------------------新闻结束-------------------->
<!-------------------第二框开始-------------------->
<div id="second">
	<div class="inform">
    	<div class="inform-head">
        	<div class="inform-head-left"><img src="<?=STATICURL?>index_img/news-left.jpg" /></div>
            	<div class="inform-head-middle">
           		  <h1>行业动态</h1>
                    <h2><a <?php if($_SESSION['userInfo']):?>href="/news/more"<?php else:?>href="javascript:alert('阅读更多请登录');"<?php endif;?>><img src="<?=STATICURL?>index_img/moer.jpg" border="0" /></a></h2>   
           		</div>
            <div class="inform-head-right"><img src="<?=STATICURL?>index_img/news-right.jpg" /></div>
        </div>
      	<div class="inform-in">
          <ul>
              <?php if($newsList):?>
                <?php foreach ($newsList as $key => $value):?>
              <li><em><?=date("Y-m-d",$value['addtime']);?></em><a class="detail" newsID ="<?=$value['newsID']?>"  href="javascript:;"><?=cutstr($value['title'],17)?></a></li>
              <?php endforeach;?>
              <?php else:?>
                <li class="gray">暂时没有数据………</span>
              <?php endif;?>
          </ul>
        </div>
    </div>
    <div class="inform">
      <div class="inform-head">
          <div class="inform-head-left"><img src="<?=STATICURL?>index_img/news-left.jpg" /></div>
              <div class="inform-head-middle">
                <h1>最新教学视频</h1>
                    <h2><a href="#"><img src="<?=STATICURL?>index_img/moer.jpg" border="0" /></a></h2>   
              </div>
            <div class="inform-head-right"><img src="<?=STATICURL?>index_img/news-right.jpg" /></div>
        </div>
          <div class="inform-in">
             <ul>
                <?php if($videoList):?>
                  <?php foreach ($videoList as $key => $value):?>
                <li><em><?=date("Y-m-d",$value['addtime']);?></em><a <?php if($_SESSION['userInfo']):?>href="/video/detail?id=<?=$value['id']?>"<?php else:?>href="javascript:alert('请登录');"<?php endif;?>  ><?=cutstr($value['title'],17)?></a></li>
                <?php endforeach;?>
                <?php else:?>
                  <li class="gray">暂时没有数据………</span>
                <?php endif;?>
            </ul>
          </div>
    </div>

    <div class="stat">
   	  <div class="stat-head">
        	<div class="stat-head-left"><img src="<?=STATICURL?>index_img/news-left.jpg" /></div>
            <div class="stat-head-middle">
            	<h1>用户统计</h1>
            </div>
            <div class="stat-head-right"><img src="<?=STATICURL?>index_img/news-right.jpg" /></div>
      </div>
        <div class="stat-in">
         <li><em><?=$userTotle?></em>注册用户总数：</li>
        </div>
    </div>
</div>
<!-------------------第二框结束-------------------->

<!-------------------页脚开始-------------------->
<div id="foot">        
	<p>子贤医管培训系统</p>
</div>
<!-------------------页脚结束-------------------->
</body>
</html>
<script src="<?=STATICURL?>js/jquery.js"></script>
<script src="<?=STATICURL?>js/layer/layer.js"></script>
<script src="<?=STATICURL?>js/jquery.easing.1.3.js"></script>
<script src="<?=STATICURL?>js/jquery.skitter.min.js"></script>
<script >
    $(document).ready(function(){

      $('.box_skitter_large').skitter({label: false, numbers: false, theme: 'square'});
    });

  </script>
<script>
$(".detail").on("click", function(){
    var id = $(this).attr("newsID");

  //iframe层-多媒体
  layer.open({
    type: 2,
    title: false,
    area: ['730px', '460px'],
    shade: 0.8,
    closeBtn: 0,
    shadeClose: true,
    content: '/news/xiangqing?id='+id
  });
});
function J_login(){
        var username = $("#username").val();
        var password = $("#password").val();
        if(username == '' || username == "请输入账号")
        {
            layer.msg("账号不能为空");
            $("#username").focus();
            return false;
        }
        if(password == '' || password == "●●●●●●")
        {
             layer.msg("密码不能为空");
             $("#password").focus();
             return false;
        }
         $.post("/login/login",{"username":username,"password":password},function(data){
            if(data.code == 0)
            {
                window.location.href="<?=BASEURL?>/"+data.page;
            }else{
                alert(data.message);
            }
        },"json");
   };

function J_reset(){
  $("#username").val('');
  $("#password").val('');
}
</script>
